<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span id="local-6989586621680840062"><span id="local-6989586621680840063"></span></span><span class="hs-pragma">{-# LANGUAGE DeriveDataTypeable #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE GeneralizedNewtypeDeriving #-}</span><span>
</span><span id="line-3"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.Types.CostCentre.State</span><span>
</span><span id="line-4"></span><span>   </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Types.CostCentre.State.html#CostCentreState"><span class="hs-identifier">CostCentreState</span></a></span><span>
</span><span id="line-5"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.CostCentre.State.html#newCostCentreState"><span class="hs-identifier">newCostCentreState</span></a></span><span>
</span><span id="line-6"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.CostCentre.State.html#CostCentreIndex"><span class="hs-identifier">CostCentreIndex</span></a></span><span>
</span><span id="line-7"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.CostCentre.State.html#unCostCentreIndex"><span class="hs-identifier">unCostCentreIndex</span></a></span><span>
</span><span id="line-8"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.CostCentre.State.html#getCCIndex"><span class="hs-identifier">getCCIndex</span></a></span><span>
</span><span id="line-9"></span><span>   </span><span class="hs-special">)</span><span>
</span><span id="line-10"></span><span class="hs-keyword">where</span><span>
</span><span id="line-11"></span><span>
</span><span id="line-12"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Prelude.html"><span class="hs-identifier">GHC.Prelude</span></a></span><span>
</span><span id="line-13"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Data.FastString.html"><span class="hs-identifier">GHC.Data.FastString</span></a></span><span>
</span><span id="line-14"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Data.FastString.Env.html"><span class="hs-identifier">GHC.Data.FastString.Env</span></a></span><span>
</span><span id="line-15"></span><span>
</span><span id="line-16"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Data.html#"><span class="hs-identifier">Data.Data</span></a></span><span>
</span><span id="line-17"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Binary.html"><span class="hs-identifier">GHC.Utils.Binary</span></a></span><span>
</span><span id="line-18"></span><span>
</span><span id="line-19"></span><span class="hs-comment">-- | Per-module state for tracking cost centre indices.</span><span>
</span><span id="line-20"></span><span class="hs-comment">--</span><span>
</span><span id="line-21"></span><span class="hs-comment">-- See documentation of 'GHC.Types.CostCentre.cc_flavour' for more details.</span><span>
</span><span id="line-22"></span><span class="hs-keyword">newtype</span><span> </span><span id="CostCentreState"><span class="annot"><a href="GHC.Types.CostCentre.State.html#CostCentreState"><span class="hs-identifier hs-var">CostCentreState</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="CostCentreState"><span class="annot"><a href="GHC.Types.CostCentre.State.html#CostCentreState"><span class="hs-identifier hs-var">CostCentreState</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Data.FastString.Env.html#FastStringEnv"><span class="hs-identifier hs-type">FastStringEnv</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span class="hs-special">)</span><span>
</span><span id="line-23"></span><span>
</span><span id="line-24"></span><span class="hs-comment">-- | Initialize cost centre state.</span><span>
</span><span id="line-25"></span><span class="annot"><a href="GHC.Types.CostCentre.State.html#newCostCentreState"><span class="hs-identifier hs-type">newCostCentreState</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.CostCentre.State.html#CostCentreState"><span class="hs-identifier hs-type">CostCentreState</span></a></span><span>
</span><span id="line-26"></span><span id="newCostCentreState"><span class="annot"><span class="annottext">newCostCentreState :: CostCentreState
</span><a href="GHC.Types.CostCentre.State.html#newCostCentreState"><span class="hs-identifier hs-var hs-var">newCostCentreState</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FastStringEnv Int -&gt; CostCentreState
</span><a href="GHC.Types.CostCentre.State.html#CostCentreState"><span class="hs-identifier hs-var">CostCentreState</span></a></span><span> </span><span class="annot"><span class="annottext">FastStringEnv Int
forall a. FastStringEnv a
</span><a href="GHC.Data.FastString.Env.html#emptyFsEnv"><span class="hs-identifier hs-var">emptyFsEnv</span></a></span><span>
</span><span id="line-27"></span><span>
</span><span id="line-28"></span><span class="hs-comment">-- | An index into a given cost centre module,name,flavour set</span><span>
</span><span id="line-29"></span><span class="hs-keyword">newtype</span><span> </span><span id="CostCentreIndex"><span class="annot"><a href="GHC.Types.CostCentre.State.html#CostCentreIndex"><span class="hs-identifier hs-var">CostCentreIndex</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="CostCentreIndex"><span class="annot"><a href="GHC.Types.CostCentre.State.html#CostCentreIndex"><span class="hs-identifier hs-var">CostCentreIndex</span></a></span></span><span> </span><span class="hs-special">{</span><span> </span><span id="unCostCentreIndex"><span class="annot"><span class="annottext">CostCentreIndex -&gt; Int
</span><a href="GHC.Types.CostCentre.State.html#unCostCentreIndex"><span class="hs-identifier hs-var hs-var">unCostCentreIndex</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-30"></span><span>  </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span id="local-6989586621680840049"><span id="local-6989586621680840054"><span class="annot"><span class="annottext">CostCentreIndex -&gt; CostCentreIndex -&gt; Bool
(CostCentreIndex -&gt; CostCentreIndex -&gt; Bool)
-&gt; (CostCentreIndex -&gt; CostCentreIndex -&gt; Bool)
-&gt; Eq CostCentreIndex
forall a. (a -&gt; a -&gt; Bool) -&gt; (a -&gt; a -&gt; Bool) -&gt; Eq a
/= :: CostCentreIndex -&gt; CostCentreIndex -&gt; Bool
$c/= :: CostCentreIndex -&gt; CostCentreIndex -&gt; Bool
== :: CostCentreIndex -&gt; CostCentreIndex -&gt; Bool
$c== :: CostCentreIndex -&gt; CostCentreIndex -&gt; Bool
</span><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Eq</span></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680840016"><span id="local-6989586621680840020"><span id="local-6989586621680840024"><span id="local-6989586621680840028"><span id="local-6989586621680840032"><span id="local-6989586621680840036"><span id="local-6989586621680840041"><span class="annot"><span class="annottext">Eq CostCentreIndex
Eq CostCentreIndex
-&gt; (CostCentreIndex -&gt; CostCentreIndex -&gt; Ordering)
-&gt; (CostCentreIndex -&gt; CostCentreIndex -&gt; Bool)
-&gt; (CostCentreIndex -&gt; CostCentreIndex -&gt; Bool)
-&gt; (CostCentreIndex -&gt; CostCentreIndex -&gt; Bool)
-&gt; (CostCentreIndex -&gt; CostCentreIndex -&gt; Bool)
-&gt; (CostCentreIndex -&gt; CostCentreIndex -&gt; CostCentreIndex)
-&gt; (CostCentreIndex -&gt; CostCentreIndex -&gt; CostCentreIndex)
-&gt; Ord CostCentreIndex
CostCentreIndex -&gt; CostCentreIndex -&gt; Bool
CostCentreIndex -&gt; CostCentreIndex -&gt; Ordering
CostCentreIndex -&gt; CostCentreIndex -&gt; CostCentreIndex
forall a.
Eq a
-&gt; (a -&gt; a -&gt; Ordering)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; a)
-&gt; (a -&gt; a -&gt; a)
-&gt; Ord a
min :: CostCentreIndex -&gt; CostCentreIndex -&gt; CostCentreIndex
$cmin :: CostCentreIndex -&gt; CostCentreIndex -&gt; CostCentreIndex
max :: CostCentreIndex -&gt; CostCentreIndex -&gt; CostCentreIndex
$cmax :: CostCentreIndex -&gt; CostCentreIndex -&gt; CostCentreIndex
&gt;= :: CostCentreIndex -&gt; CostCentreIndex -&gt; Bool
$c&gt;= :: CostCentreIndex -&gt; CostCentreIndex -&gt; Bool
&gt; :: CostCentreIndex -&gt; CostCentreIndex -&gt; Bool
$c&gt; :: CostCentreIndex -&gt; CostCentreIndex -&gt; Bool
&lt;= :: CostCentreIndex -&gt; CostCentreIndex -&gt; Bool
$c&lt;= :: CostCentreIndex -&gt; CostCentreIndex -&gt; Bool
&lt; :: CostCentreIndex -&gt; CostCentreIndex -&gt; Bool
$c&lt; :: CostCentreIndex -&gt; CostCentreIndex -&gt; Bool
compare :: CostCentreIndex -&gt; CostCentreIndex -&gt; Ordering
$ccompare :: CostCentreIndex -&gt; CostCentreIndex -&gt; Ordering
</span><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Ord</span></span></span></span></span></span></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680839979"><span id="local-6989586621680839981"><span id="local-6989586621680839983"><span id="local-6989586621680839985"><span id="local-6989586621680839987"><span id="local-6989586621680839989"><span id="local-6989586621680839991"><span id="local-6989586621680839993"><span id="local-6989586621680839995"><span id="local-6989586621680839997"><span id="local-6989586621680839999"><span id="local-6989586621680840001"><span id="local-6989586621680840004"><span id="local-6989586621680840008"><span class="annot"><span class="annottext">Typeable CostCentreIndex
Typeable CostCentreIndex
-&gt; (forall (c :: * -&gt; *).
    (forall d b. Data d =&gt; c (d -&gt; b) -&gt; d -&gt; c b)
    -&gt; (forall g. g -&gt; c g) -&gt; CostCentreIndex -&gt; c CostCentreIndex)
-&gt; (forall (c :: * -&gt; *).
    (forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r)
    -&gt; (forall r. r -&gt; c r) -&gt; Constr -&gt; c CostCentreIndex)
-&gt; (CostCentreIndex -&gt; Constr)
-&gt; (CostCentreIndex -&gt; DataType)
-&gt; (forall (t :: * -&gt; *) (c :: * -&gt; *).
    Typeable t =&gt;
    (forall d. Data d =&gt; c (t d)) -&gt; Maybe (c CostCentreIndex))
-&gt; (forall (t :: * -&gt; * -&gt; *) (c :: * -&gt; *).
    Typeable t =&gt;
    (forall d e. (Data d, Data e) =&gt; c (t d e))
    -&gt; Maybe (c CostCentreIndex))
-&gt; ((forall b. Data b =&gt; b -&gt; b)
    -&gt; CostCentreIndex -&gt; CostCentreIndex)
-&gt; (forall r r'.
    (r -&gt; r' -&gt; r)
    -&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; CostCentreIndex -&gt; r)
-&gt; (forall r r'.
    (r' -&gt; r -&gt; r)
    -&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; CostCentreIndex -&gt; r)
-&gt; (forall u.
    (forall d. Data d =&gt; d -&gt; u) -&gt; CostCentreIndex -&gt; [u])
-&gt; (forall u.
    Int -&gt; (forall d. Data d =&gt; d -&gt; u) -&gt; CostCentreIndex -&gt; u)
-&gt; (forall (m :: * -&gt; *).
    Monad m =&gt;
    (forall d. Data d =&gt; d -&gt; m d)
    -&gt; CostCentreIndex -&gt; m CostCentreIndex)
-&gt; (forall (m :: * -&gt; *).
    MonadPlus m =&gt;
    (forall d. Data d =&gt; d -&gt; m d)
    -&gt; CostCentreIndex -&gt; m CostCentreIndex)
-&gt; (forall (m :: * -&gt; *).
    MonadPlus m =&gt;
    (forall d. Data d =&gt; d -&gt; m d)
    -&gt; CostCentreIndex -&gt; m CostCentreIndex)
-&gt; Data CostCentreIndex
CostCentreIndex -&gt; DataType
CostCentreIndex -&gt; Constr
(forall b. Data b =&gt; b -&gt; b) -&gt; CostCentreIndex -&gt; CostCentreIndex
forall a.
Typeable a
-&gt; (forall (c :: * -&gt; *).
    (forall d b. Data d =&gt; c (d -&gt; b) -&gt; d -&gt; c b)
    -&gt; (forall g. g -&gt; c g) -&gt; a -&gt; c a)
-&gt; (forall (c :: * -&gt; *).
    (forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r)
    -&gt; (forall r. r -&gt; c r) -&gt; Constr -&gt; c a)
-&gt; (a -&gt; Constr)
-&gt; (a -&gt; DataType)
-&gt; (forall (t :: * -&gt; *) (c :: * -&gt; *).
    Typeable t =&gt;
    (forall d. Data d =&gt; c (t d)) -&gt; Maybe (c a))
-&gt; (forall (t :: * -&gt; * -&gt; *) (c :: * -&gt; *).
    Typeable t =&gt;
    (forall d e. (Data d, Data e) =&gt; c (t d e)) -&gt; Maybe (c a))
-&gt; ((forall b. Data b =&gt; b -&gt; b) -&gt; a -&gt; a)
-&gt; (forall r r'.
    (r -&gt; r' -&gt; r) -&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; a -&gt; r)
-&gt; (forall r r'.
    (r' -&gt; r -&gt; r) -&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; a -&gt; r)
-&gt; (forall u. (forall d. Data d =&gt; d -&gt; u) -&gt; a -&gt; [u])
-&gt; (forall u. Int -&gt; (forall d. Data d =&gt; d -&gt; u) -&gt; a -&gt; u)
-&gt; (forall (m :: * -&gt; *).
    Monad m =&gt;
    (forall d. Data d =&gt; d -&gt; m d) -&gt; a -&gt; m a)
-&gt; (forall (m :: * -&gt; *).
    MonadPlus m =&gt;
    (forall d. Data d =&gt; d -&gt; m d) -&gt; a -&gt; m a)
-&gt; (forall (m :: * -&gt; *).
    MonadPlus m =&gt;
    (forall d. Data d =&gt; d -&gt; m d) -&gt; a -&gt; m a)
-&gt; Data a
forall u.
Int -&gt; (forall d. Data d =&gt; d -&gt; u) -&gt; CostCentreIndex -&gt; u
forall u. (forall d. Data d =&gt; d -&gt; u) -&gt; CostCentreIndex -&gt; [u]
forall r r'.
(r -&gt; r' -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; CostCentreIndex -&gt; r
forall r r'.
(r' -&gt; r -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; CostCentreIndex -&gt; r
forall (m :: * -&gt; *).
Monad m =&gt;
(forall d. Data d =&gt; d -&gt; m d)
-&gt; CostCentreIndex -&gt; m CostCentreIndex
forall (m :: * -&gt; *).
MonadPlus m =&gt;
(forall d. Data d =&gt; d -&gt; m d)
-&gt; CostCentreIndex -&gt; m CostCentreIndex
forall (c :: * -&gt; *).
(forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r)
-&gt; (forall r. r -&gt; c r) -&gt; Constr -&gt; c CostCentreIndex
forall (c :: * -&gt; *).
(forall d b. Data d =&gt; c (d -&gt; b) -&gt; d -&gt; c b)
-&gt; (forall g. g -&gt; c g) -&gt; CostCentreIndex -&gt; c CostCentreIndex
forall (t :: * -&gt; *) (c :: * -&gt; *).
Typeable t =&gt;
(forall d. Data d =&gt; c (t d)) -&gt; Maybe (c CostCentreIndex)
forall (t :: * -&gt; * -&gt; *) (c :: * -&gt; *).
Typeable t =&gt;
(forall d e. (Data d, Data e) =&gt; c (t d e))
-&gt; Maybe (c CostCentreIndex)
gmapMo :: forall (m :: * -&gt; *).
MonadPlus m =&gt;
(forall d. Data d =&gt; d -&gt; m d)
-&gt; CostCentreIndex -&gt; m CostCentreIndex
$cgmapMo :: forall (m :: * -&gt; *).
MonadPlus m =&gt;
(forall d. Data d =&gt; d -&gt; m d)
-&gt; CostCentreIndex -&gt; m CostCentreIndex
gmapMp :: forall (m :: * -&gt; *).
MonadPlus m =&gt;
(forall d. Data d =&gt; d -&gt; m d)
-&gt; CostCentreIndex -&gt; m CostCentreIndex
$cgmapMp :: forall (m :: * -&gt; *).
MonadPlus m =&gt;
(forall d. Data d =&gt; d -&gt; m d)
-&gt; CostCentreIndex -&gt; m CostCentreIndex
gmapM :: forall (m :: * -&gt; *).
Monad m =&gt;
(forall d. Data d =&gt; d -&gt; m d)
-&gt; CostCentreIndex -&gt; m CostCentreIndex
$cgmapM :: forall (m :: * -&gt; *).
Monad m =&gt;
(forall d. Data d =&gt; d -&gt; m d)
-&gt; CostCentreIndex -&gt; m CostCentreIndex
gmapQi :: forall u.
Int -&gt; (forall d. Data d =&gt; d -&gt; u) -&gt; CostCentreIndex -&gt; u
$cgmapQi :: forall u.
Int -&gt; (forall d. Data d =&gt; d -&gt; u) -&gt; CostCentreIndex -&gt; u
gmapQ :: forall u. (forall d. Data d =&gt; d -&gt; u) -&gt; CostCentreIndex -&gt; [u]
$cgmapQ :: forall u. (forall d. Data d =&gt; d -&gt; u) -&gt; CostCentreIndex -&gt; [u]
gmapQr :: forall r r'.
(r' -&gt; r -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; CostCentreIndex -&gt; r
$cgmapQr :: forall r r'.
(r' -&gt; r -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; CostCentreIndex -&gt; r
gmapQl :: forall r r'.
(r -&gt; r' -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; CostCentreIndex -&gt; r
$cgmapQl :: forall r r'.
(r -&gt; r' -&gt; r)
-&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; CostCentreIndex -&gt; r
gmapT :: (forall b. Data b =&gt; b -&gt; b) -&gt; CostCentreIndex -&gt; CostCentreIndex
$cgmapT :: (forall b. Data b =&gt; b -&gt; b) -&gt; CostCentreIndex -&gt; CostCentreIndex
dataCast2 :: forall (t :: * -&gt; * -&gt; *) (c :: * -&gt; *).
Typeable t =&gt;
(forall d e. (Data d, Data e) =&gt; c (t d e))
-&gt; Maybe (c CostCentreIndex)
$cdataCast2 :: forall (t :: * -&gt; * -&gt; *) (c :: * -&gt; *).
Typeable t =&gt;
(forall d e. (Data d, Data e) =&gt; c (t d e))
-&gt; Maybe (c CostCentreIndex)
dataCast1 :: forall (t :: * -&gt; *) (c :: * -&gt; *).
Typeable t =&gt;
(forall d. Data d =&gt; c (t d)) -&gt; Maybe (c CostCentreIndex)
$cdataCast1 :: forall (t :: * -&gt; *) (c :: * -&gt; *).
Typeable t =&gt;
(forall d. Data d =&gt; c (t d)) -&gt; Maybe (c CostCentreIndex)
dataTypeOf :: CostCentreIndex -&gt; DataType
$cdataTypeOf :: CostCentreIndex -&gt; DataType
toConstr :: CostCentreIndex -&gt; Constr
$ctoConstr :: CostCentreIndex -&gt; Constr
gunfold :: forall (c :: * -&gt; *).
(forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r)
-&gt; (forall r. r -&gt; c r) -&gt; Constr -&gt; c CostCentreIndex
$cgunfold :: forall (c :: * -&gt; *).
(forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r)
-&gt; (forall r. r -&gt; c r) -&gt; Constr -&gt; c CostCentreIndex
gfoldl :: forall (c :: * -&gt; *).
(forall d b. Data d =&gt; c (d -&gt; b) -&gt; d -&gt; c b)
-&gt; (forall g. g -&gt; c g) -&gt; CostCentreIndex -&gt; c CostCentreIndex
$cgfoldl :: forall (c :: * -&gt; *).
(forall d b. Data d =&gt; c (d -&gt; b) -&gt; d -&gt; c b)
-&gt; (forall g. g -&gt; c g) -&gt; CostCentreIndex -&gt; c CostCentreIndex
</span><a href="../../base/src/Data.Data.html#Data"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Data</span></a></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680839967"><span id="local-6989586621680839971"><span id="local-6989586621680839976"><span class="annot"><span class="annottext">BinHandle -&gt; IO CostCentreIndex
BinHandle -&gt; CostCentreIndex -&gt; IO ()
BinHandle -&gt; CostCentreIndex -&gt; IO (Bin CostCentreIndex)
(BinHandle -&gt; CostCentreIndex -&gt; IO ())
-&gt; (BinHandle -&gt; CostCentreIndex -&gt; IO (Bin CostCentreIndex))
-&gt; (BinHandle -&gt; IO CostCentreIndex)
-&gt; Binary CostCentreIndex
forall a.
(BinHandle -&gt; a -&gt; IO ())
-&gt; (BinHandle -&gt; a -&gt; IO (Bin a))
-&gt; (BinHandle -&gt; IO a)
-&gt; Binary a
get :: BinHandle -&gt; IO CostCentreIndex
$cget :: BinHandle -&gt; IO CostCentreIndex
put :: BinHandle -&gt; CostCentreIndex -&gt; IO (Bin CostCentreIndex)
$cput :: BinHandle -&gt; CostCentreIndex -&gt; IO (Bin CostCentreIndex)
put_ :: BinHandle -&gt; CostCentreIndex -&gt; IO ()
$cput_ :: BinHandle -&gt; CostCentreIndex -&gt; IO ()
</span><a href="GHC.Utils.Binary.html#C%3ABinary"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Binary</span></a></span></span></span></span><span class="hs-special">)</span><span>
</span><span id="line-31"></span><span>
</span><span id="line-32"></span><span class="hs-comment">-- | Get a new index for a given cost centre name.</span><span>
</span><span id="line-33"></span><span class="annot"><a href="GHC.Types.CostCentre.State.html#getCCIndex"><span class="hs-identifier hs-type">getCCIndex</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Data.FastString.html#FastString"><span class="hs-identifier hs-type">FastString</span></a></span><span>
</span><span id="line-34"></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.CostCentre.State.html#CostCentreState"><span class="hs-identifier hs-type">CostCentreState</span></a></span><span>
</span><span id="line-35"></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.CostCentre.State.html#CostCentreIndex"><span class="hs-identifier hs-type">CostCentreIndex</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.CostCentre.State.html#CostCentreState"><span class="hs-identifier hs-type">CostCentreState</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-36"></span><span id="getCCIndex"><span class="annot"><span class="annottext">getCCIndex :: FastString -&gt; CostCentreState -&gt; (CostCentreIndex, CostCentreState)
</span><a href="GHC.Types.CostCentre.State.html#getCCIndex"><span class="hs-identifier hs-var hs-var">getCCIndex</span></a></span></span><span> </span><span id="local-6989586621680839962"><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680839962"><span class="hs-identifier hs-var">nm</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.CostCentre.State.html#CostCentreState"><span class="hs-identifier hs-type">CostCentreState</span></a></span><span> </span><span id="local-6989586621680839961"><span class="annot"><span class="annottext">FastStringEnv Int
</span><a href="#local-6989586621680839961"><span class="hs-identifier hs-var">m</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-37"></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; CostCentreIndex
</span><a href="GHC.Types.CostCentre.State.html#CostCentreIndex"><span class="hs-identifier hs-var">CostCentreIndex</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680839960"><span class="hs-identifier hs-var">idx</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FastStringEnv Int -&gt; CostCentreState
</span><a href="GHC.Types.CostCentre.State.html#CostCentreState"><span class="hs-identifier hs-var">CostCentreState</span></a></span><span> </span><span class="annot"><span class="annottext">FastStringEnv Int
</span><a href="#local-6989586621680839959"><span class="hs-identifier hs-var">m'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-38"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-39"></span><span>    </span><span id="local-6989586621680839958"><span class="annot"><span class="annottext">m_idx :: Maybe Int
</span><a href="#local-6989586621680839958"><span class="hs-identifier hs-var hs-var">m_idx</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FastStringEnv Int -&gt; FastString -&gt; Maybe Int
forall a. FastStringEnv a -&gt; FastString -&gt; Maybe a
</span><a href="GHC.Data.FastString.Env.html#lookupFsEnv"><span class="hs-identifier hs-var">lookupFsEnv</span></a></span><span> </span><span class="annot"><span class="annottext">FastStringEnv Int
</span><a href="#local-6989586621680839961"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680839962"><span class="hs-identifier hs-var">nm</span></a></span><span>
</span><span id="line-40"></span><span>    </span><span id="local-6989586621680839960"><span class="annot"><span class="annottext">idx :: Int
</span><a href="#local-6989586621680839960"><span class="hs-identifier hs-var hs-var">idx</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; (Int -&gt; Int) -&gt; Maybe Int -&gt; Int
forall b a. b -&gt; (a -&gt; b) -&gt; Maybe a -&gt; b
</span><a href="../../base/src/Data.Maybe.html#maybe"><span class="hs-identifier hs-var">maybe</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int
forall a. a -&gt; a
</span><a href="../../base/src/GHC.Base.html#id"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Int
</span><a href="#local-6989586621680839958"><span class="hs-identifier hs-var">m_idx</span></a></span><span>
</span><span id="line-41"></span><span>    </span><span id="local-6989586621680839959"><span class="annot"><span class="annottext">m' :: FastStringEnv Int
</span><a href="#local-6989586621680839959"><span class="hs-identifier hs-var hs-var">m'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FastStringEnv Int -&gt; FastString -&gt; Int -&gt; FastStringEnv Int
forall a. FastStringEnv a -&gt; FastString -&gt; a -&gt; FastStringEnv a
</span><a href="GHC.Data.FastString.Env.html#extendFsEnv"><span class="hs-identifier hs-var">extendFsEnv</span></a></span><span> </span><span class="annot"><span class="annottext">FastStringEnv Int
</span><a href="#local-6989586621680839961"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">FastString
</span><a href="#local-6989586621680839962"><span class="hs-identifier hs-var">nm</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680839960"><span class="hs-identifier hs-var">idx</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span>
</span><span id="line-42"></span></pre></body></html>